     end
   end
 
+  @remote_timeout 4000
   def handle_in("public_timeline", _params, socket) do
     user = socket.assigns.user
     servers = if is_nil(user) do

      posts = Post.public_timeline()
              |> Repo.all()
    end)
    response = Task.async_stream(servers, fn %{host: host} ->
      resp = Share.Remote.Message.create(host, "public_timeline")
               |> Share.Remote.RequestServer.request()
      {resp, host}
    end)
    |> Enum.map(fn result ->
      case result do
        {:ok, {resp, host}} ->
          case resp do
            %{"payload" => %{"posts" => posts}} ->
              posts = Task.async_stream(posts, fn post ->

            :timeout -> {:timeout, host}
            _ -> {:error, host}
          end
        {:exit, _} -> {:error, host}
        nil -> {:timeout, host}
      end
    end)
    posts = Task.await(task)
