Jump to content

lufihengr

Member
  • Posts

    1,282
  • Joined

  • Last visited

Reputation Activity

  1. Like
    lufihengr reacted to Svek in OCPP 1.6 JSON and websockets   
    When working with WebSockets you need to design your application differently from conventional request/response systems (such as your previous experience with REST --- i.e. "representational state transfer")
     
    WebSockets is designed so that it opens up a two-way communication between either side --- i.e. "sockets".
     
    The best analogy I can think of is like having two neighbors throwing paper planes into each other's windows to pass a message to each other.
    You may come home and find a bunch of paper planes on the floor (from your neighbor) in your room.
    You can open these up in any order you want, no one cares...
    If your protocol (agreement you made with each other) is that a red paper plane comes in, you open it first and you MUST send something back. <-- this is a standard --- like OCPP
     
    This way your neighbor knows that if you don't respond to the red paper plane, you probably went on a vacation and he can take a break from trying to communicate with you.
     
    A few things here to keep in mind.
    (a) order received is never guaranteed... there are things like putting numbers to each message so you know what order you SHOULD read it in, but delivery isn't guaranteed to come in that order. Say I wrote a bunch of letters for a long message, and I got someone else to fold the paper plane and threw them across into your window, maybe they did something out of sequence, but who cares, since you should read the messages as numbered anyway.
     
    (b) sometimes you might not receive it at all... windy conditions can take a paper plane out of transit to you and you might miss a message. The numbering technique (above) is important to know something got lost... so you can tell your friend to send another one.
     
    (c) when you start to involve more friends you're gonna deal with a lot of messages.... the bigger your network, the more complex you need to design your process to deal with the massive pile of paper planes to open up and read.
     
    (d) you don't need to respond to everything... sometimes you'll just get some information and it's not expected to send back a response, it's totally up to you what you want to do
     
    (e) sometimes you MUST respond... hopefully this is obvious at this point.
     
    (f) for everything above... "add vice versa" to the end and re-read them.
     
    There are a lot of libraries that give you a lot of tools to help manage all this complexity for you, but if you don't understand what's going on under the hood it could be really challenging to write the code or make sense of all the paper planes on your floor.
  2. Like
    lufihengr reacted to Octoturge in OCPP 1.6 JSON and websockets   
    not yet
    by not yet I mean I'll be working in a week or so haha 😆
  3. Like
    lufihengr got a reaction from ShawnCockburn in OCPP 1.6 JSON and websockets   
    Hi,
    I'm trying to build a backend system using OCPP 1.6 JSON over websockets in Node. I am having some trouble with the whole websockets thing, I have experience with REST api's but this is throwing me for a loop.
     
    Essentially where I am at is that I receive a message from the charger like this: 
    [2, "19223201", "BootNotification", {"chargePointVendor": "VendorX", "chargePointModel": "SingleSocketCharger"} ] I need to put this in a database which I can probably figure out myself, but more importantly I need to de-construct the message and generate an appropriate response.
     
    In this case it would look something like this: 
    [3, "19223201", {"status":"Accepted", "currentTime":"2013-02-01T20:53:32.486Z", "heartbeatInterval":300} ]  
    And I have no idea how to do it. Essentially I need a lot of if statements like if the massage has "BootNotification" in it, then send the accept message and if it has something else, then respond appropriately.
     
    If someone can help, I'll buy you a beer or coffee or beverage of your choosing?
     
    Edit: the documentation for the OCPP protocol is available here: https://www.openchargealliance.org/downloads/
  4. Funny
    lufihengr got a reaction from Kilrah in Your own GeForce now?   
    Like @Kilrah said, unless you have a god-tier internet connection, it's not going to be playable.
     
    The 3 real options are:
     
    1. Lend the PC to your friend
    2. Have your friend come over to your house to play.
    3. Run a network cable (most likely needs to be fiber) from your house to your friends house. You need to reserve about 100 grand for this, if it's less than like a few miles
     
     
  5. Agree
    lufihengr reacted to WereCat in MSI X299 Gaming Pro worth getting?   
    The 3950X is pretty much on par with the 10980XE while having 2 less cores and being significantly cheaper though. 
     
    So unless you want the platform specific features then maybe think it trough and decide if you really need to go HEDT. 
  6. Agree
    lufihengr reacted to GoldenLag in MSI X299 Gaming Pro worth getting?   
    yup, keep also in mind if that you dont need the PCIe lanes. the X570 + 3950x is also an option. 
     
    as a chip for the PCIe lanes it makes sense. if that is not what you are after, then other options are likely better to stretch to or save money on. 
  7. Informative
    lufihengr reacted to tesseramous in Is getting CL14 over CL16 worth it?   
    By itself for most cases its probably not that important,  unless
     
    1. You want to overclock your ram to the highest speed possible,  you'll get more out of the cl14
     
    2. You want to install a ton of ram in a threadripper system. In that case the cl14 is more likely to samsung B die which works alot better in Threadripper.
     
    If money is at all a concern - you're not loaded with money and aren't competing in benchmarks or building a server/workstation (without ecc) then you'd go with cl16. At most you'll lose a few fps in games.
  8. Agree
    lufihengr got a reaction from TetraSky in Morality questioned by Pirates   
    Purely morally, it's fine. 
  9. Funny
    lufihengr got a reaction from Aleksa Djordjic in MySQL | How to store insanely long strings ?   
    FTFY
  10. Funny
    lufihengr got a reaction from Stealhelm in MySQL | How to store insanely long strings ?   
    FTFY
  11. Agree
    lufihengr got a reaction from Crunken in Buzzing sound only while gaming?   
    Coil whine
  12. Informative
    lufihengr reacted to rares495 in Is getting CL14 over CL16 worth it?   
    Capacity should be more important. CAS latency(CL) doesn't matter as much as the speed. Plus you can tweak stuff and probably get better timings anyway.
  13. Informative
    lufihengr reacted to rares495 in Is getting CL14 over CL16 worth it?   
    It might be worth to pay extra, but not 70-100 euro extra.
  14. Informative
    lufihengr reacted to Skiiwee29 in Is getting CL14 over CL16 worth it?   
    for gaming, no, it wont make much of a difference. It only really can make a difference with heavy ram specific tasks such as AI and deep learning. 
  15. Like
    lufihengr reacted to iLostMyXbox21 in Used 970   
    oh my thanks for that site.. not for this but for everything else ??
  16. Agree
    lufihengr got a reaction from kevinisbeast707 in Headphones recommendation: ATH M50xBT or Bose QC II or Sony 1000XM3   
    I think the Sony's are newer so should expect them to be better. Bose are the most comfy though as you said.
     
    @cbhhargava If you might not need wireless, look at QC 25's. They are super cheap now and for the price I don't think they can be beat
  17. Agree
    lufihengr got a reaction from Nathan cole in do i need to upgrade my psu???   
    Your money would be better spent upgrading your whole system. Look for complete PC's on the used market, there are deals to be had as long as you look for them
  18. Agree
    lufihengr got a reaction from mineblaster in Windows 2016 data-center.   
    Make a network share on your server, mount it as a drive on your PC and direct your downloads there. Bish bash bosh jobs done
  19. Like
    lufihengr got a reaction from nicklmg in iPhone X Review – Pushing Me to Android   
    The 8 plus is starting to feel like the right option. Cheaper too
    Thank you Nick for saving me €€€
    Edit: with the saving, I can afford floatplane! 
    Lmg marketing team on point. 
  20. Agree
    lufihengr got a reaction from NelizMastr in Windows 2016 data-center.   
    Make a network share on your server, mount it as a drive on your PC and direct your downloads there. Bish bash bosh jobs done
  21. Like
    lufihengr reacted to jwworker201 in Need help on NAS solution   
    Basically it depends on your budget and usecase. If you want to use it just as an NAS, any fairly new Celeron board will do (or maybe something with an Pentium). If you want to run FreeNAS you need at least one GB of RAM for every TB you want to run but you don't need an discrete RAID card, FreeNAS is pure software RAID as well as unRAID etc. will be. I personally have an Parity Array on my Windows Server 2016 Machine but it's similar to the system unRAID uses. 
    I was in a similar situation because my NAS/Server needed to be silent as well. I have settled on BeQuiet parts for cooling and the only thing you can hear are the hard drives (which is fairly silent) - I am using WD Reds @5400 rpm. 
    If you want just PM me and I can give you further advice  
  22. Agree
    lufihengr reacted to Leonard in Can you run a 1080P monitor at 4K in Windows desktop?   
    Right, remember i said i don't use scaling so this is where the difference in cursor size is happening.
  23. Informative
    lufihengr reacted to Mira Yurizaki in Can you run a 1080P monitor at 4K in Windows desktop?   
    You can with NVIDIA DSR or the AMD equivalent.
     
    This is a problem inherit in desktop composition in general. I don't think it'll be fixed natively.
  24. Informative
    lufihengr reacted to Leonard in Can you run a 1080P monitor at 4K in Windows desktop?   
    Yes with DSR and it works fine.
  25. Informative
    lufihengr reacted to vanished in Can you run a 1080P monitor at 4K in Windows desktop?   
    Yes, VSR lets you do this easily, I've done it myself before  
    I assume Nvidia's DSR would work as well but that is not something I could ever confirm for myself
×