Using Photon Voice with Photon Realtime - Upgrading to PUN ?

Options
Hi there,

We are a team currently developing a pro tool and we are using Photon Realtime SDK (the lowest level) as we feel it gives us much more control over our network communication than the highest level options (PUN or BOLT).

We already have a whole solution running with Photon Realtime SDK, with multiuser editing of parametric models. And now we are looking at integrating a voice chat solution to allow our users to communicate with voice directly in the app.

It seems Photon Voice would be a good option, but as far as I understand it relies on PUN.

- is there a Photon Voice implementation which doesn't need PUN but can be plugged in using the Photon Realtime SDK ?
- if we have to update to PUN, does that mean we have to refactor entirely our network systems ?
- is there a migration guide somewhere for people who have an app running on Photon Realtime who want to migrate to PUN ?

All the best,
Pierre

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @PierreBlanc,

    Thank you for choosing Photon!

    we are using Photon Realtime SDK (the lowest level) as we feel it gives us much more control over our network communication than the highest level options (PUN or BOLT).

    I would stick with Photon Realtime since you have this requirement but you should know that Bolt is different. While it uses Photon Realtime it does not work on top of it as PUN.

    We are a team currently developing a pro tool

    We already have a whole solution running with Photon Realtime SDK, with multiuser editing of parametric models.
    Now I'm curious to know more about your tool and maybe try it.

    - is there a Photon Voice implementation which doesn't need PUN but can be plugged in using the Photon Realtime SDK ?
    - if we have to update to PUN, does that mean we have to refactor entirely our network systems ?
    - is there a migration guide somewhere for people who have an app running on Photon Realtime who want to migrate to PUN ?

    - In Photon Voice 2 yes there is one out-of-the-box but it uses Photon Realtime 2 which is not released standalone yet but you can get it from PUN2 or Photon Voice 2. In Photon Voice 1 you need to strip PUN integration yourself or redo the Unity layer of Photon Voice on top of PhotonVoiceAPI yourself. Some customers did this but I recommend updating to Photon Voice 2 and Photon Realtime 2.
    - It depends but I don't think so.
    - I don't know of such guide sorry.
  • Hi John,

    Thank you very much for your very fast answer.

    We already had a chat with Christof Wegmann and Robert Boehm last October about our tool, unfortunately at this time we cannot give any more details.

    I have just downloaded VoiceV2 and got the RealtimeV2 from there.

    However it seems there are quite few breaking changes in the RealtimeV2 implementation, and its kind of hard to understand what is the right way to setup things now. When I did implement RealtimeV1, I started from a demo if i remember correctly which showed how to use the loadbalancingclient. There is such a demo shipped with RealtimeV2 in VoiceV2 package but its very minimal and quite different if i remember the original demo.

    - Do you have a doc available for migration from Realtime V1 to V2 ?
    - What is the planned standalone release date of Realtime v2 ?

    All the best,
    Pierre
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Options
    Hi @PierreBlanc,

    - Do you have a doc available for migration from Realtime V1 to V2 ?
    No sorry we only have Migration Notes for PUN1 to PUN2.
    The core and basic concepts of Photon Realtime a.k.a. LoadBalancingApi are the same.
    LoadBalancingClient and LoadBalancingPeer and same operations, connection flow and events.
    What changed from Photon Realtime 1 and 2:

    - namespace Photon.Realtime
    - renaming public fields and properties to PascalCasing
    - renaming of events/delegate, enums and enum values
    - a bit of clean up and refactoring
    - introduced Callback Interfaces
    - less caching, we don't keep a list of friends or rooms in the client

    I don't have an ETA for the standalone/official release of Photon Realtime 2.
  • Hi John,

    Ok great thanks for the changelist and the link to this new Callback interfaces.
    I will attempt the migration now and if all goes well i should be in a position to evaluate VoiceV2 tomorrow.

    All the best,
    Pierre
  • Hi there,

    I must say it was almost effortless to migrate our app to RealtimeV2 and so far the the changes in the API are very positive and make the API even cleaner, well done guys!

    Thanks for your help.

    I also managed to get VoiceV2 running and get a basic communication going on in the multiuser version of our app.

    I however have few questions on concepts I'm not sure to understand fully.

    1) As far as I understand, Voice and Realtime are totally independent. If you run an app using Photon Realtime and Voice you end up with 2 clients, and 2 communication flows to manage. Is that correct ? Is there any plan in the future to unify those ?

    - i may be disconnecte from Realtime, but not from Voice, for various reasons, and so it seems i have to manage my connection at a higher lever that wrap both and make sure they are in sync.
    - the same happens with rooms. In our app we use rooms for a place where users meet for a collaborative editing session. In this case it means that with Voice I have to create another room for users to meet vocally for the same session. Or do i miss something ? It seems to me that it makes error handling quite complicated and requires a synchronization flow between the 2 clients on the same machine.

    Any thoughts on this matter ?

    All the best,
    Pierre
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited December 2018
    Options
    Hi @PierreBlanc,

    Thank you for your feedback! It is always welcome.

    As far as I understand, Voice and Realtime are totally independent. If you run an app using Photon Realtime and Voice you end up with 2 clients, and 2 communication flows to manage. Is that correct ?
    No it's not. Photon Voice runs on top of Photon Realtime. LoadBalancingClient is a "frontend" for the VoiceClient and Photon Realtime is a "transport layer" for Photon Voice. Photon Voice depends on Photon Realtime and can't work without it.
    Is there any plan in the future to unify those ?
    You can use option C below.

    - i may be disconnecte from Realtime, but not from Voice, for various reasons, and so it seems i have to manage my connection at a higher lever that wrap both and make sure they are in sync.
    - the same happens with rooms. In our app we use rooms for a place where users meet for a collaborative editing session. In this case it means that with Voice I have to create another room for users to meet vocally for the same session. Or do i miss something ?
    The flow you described is exactly what we did with Photon Voice 1 and the PUN2 integration in Photon Voice 2. Photon Voice client is kept in sync (same ClientState) with PUN client and creates a "voice mirroring room" when there is a "PUN room". But it's one way to do things. If you want to go this way you could take a look at PhotonVoiceConnection. PUNVoice integration has something unique though, it does the Recorder - Speaker binding using PhotonViewID (Recorder.UserObject).

    Voice's LoadBalancingFrontend extends Realtime's LoadBalancingClient. Use that client for option C below.
    VoiceConnection.Client is a LoadBalancingClient (Realtime Client)

    On Photon Cloud, using Photon Voice with Photon Realtime is possible in three ways:

    A. 2 Clients 2 AppIds 2 Apps 2 Plans
    B. 2 Clients 1 AppId 1 App 1 Plan "Twice the CCU"
    C. 1 Client 1 AppId 1 App 1 Plan "mind the bandwidth"