server: support slices

cc @hhuuggoo