Tag: syndicated

  • Copy Files to a Docker Container

    One of the things that’s handy when working with containers is being able to move files in and out of the container. Certainly you can do this from a network share or other similar mechanism, but what about a straight copy?

    Docker has a command with the cp parameter to do this.

    docker cp WideWorldImporters.bak SQL17:/var/opt/mssql/data/WideWorldImporteres.bak
    

    The structure is the from:to, separated by a space as two parameters. If you’re going to the host, then just the path and filename, or just name if the current folder) for the file. For the container, you need the container ID or name with a colon (:) and then the relative path.

    A quick way to begin changing and customizing your containers by moving data in and out as needed.

  • Off-Topic Origem HS-3 Headphones Review

    I’m a big fan of music when I’m moving through life, and I use a lot of headphones. Between the gym, travel, and downtime between volleyball matches, I often have a pair with me. Actually, I often have a few pairs. In general I have tended to stick with wired models, but I do have a couple pairs of bluetooth models. I was contacted by Origem recently and asked if I would be interested in reviewing a pair of their HS-3 model. I agreed.

    The Pros: Great sound, physical control to easily pause/play, change volume, and change tracks. Lightweight and good battery life.

    The Cons: Bulky drivers noticeable and volume doesn’t quite get loud enough.

    Bottom Line: A good set of headphones, great connectivity, and waterproof. They seem durable across a few weeks, though time will tell if the headphones are worth the price.

    Initial Testing

    The headphones arrived charged. I powered them on and immediately they were looking to pair. I had my Garmin Forerunner 645 watch handy, and the pairing was smooth and quick. I know Bluetooth is getting better, and this was an example of how smooth the process was. I opened the settings on my phone, and with a long press on the volume, paired to that device as well.

    headphones_d

    I found it very easy to move between devices, though I did need to disconnect the headphones from the device. My phone had priority when connecting, but I think that’s likely because the watch doesn’t  automatically connect to anything.

    The headphones come with 4 different earpieces. I haven’t ever seen that, as most models seem to come with three. In this case, I had to try both the middle sizes to find the one that works best. It was a little hard for me to get the earpieces on the plastic bolt, but that’s likely me struggling to keep hold of the small rubber buds.

    There is a cord connecting the two headphones, which has a physical set of controls on the right ear. This is a long inline control pod on the wire. There is a center button that powers on/off (and pairs), we well as a button on each end that control volume (short press) or change tracks (long press). I found this to be easy to use throughout my testing and handy when at the gym and wanting to change a setting. It’s also nice to be able to pause quickly when someone tries to talk to me.

    The earpieces are different than anything I’ve seen. I do prefer those that hook over the year for security. I sweat a lot at the gym, and I never really have a great fit from the rubber inserts. I’m afraid of the Bluetooth separate buds that are all the rage as I have enough trouble with earbuds falling out while weightlifting or using the elliptical machine.

    In this case, there are wire over ear hooks, but they are on a swivel that allows me to put the rubber piece in my ear canal and swivel the hook down. I can also pop out the bud to hear better, and the hook allows the headphone to swing away, but remain secure.

    headphones_a

    The back of the wire has a rubber cover to reduce irritation, but the top loop is metal. I wish the rubber went a little higher, but I didn’t really have the irritation I’ve had with other Bluetooth mobile earpieces or even the other in-ear headphones I’ve tried. In fact, these have the most comfortable fit or the top/back of my ear.

    There is a small rubber fitting for the wire that allows you to shorten the wire and tighten the wire against your head. I found if I kept this tight for vigorous exercise, it worked great. If I had it at the loosest setting, when I turned my head, I felt a the wires pulling across the back of my neck. This has been a problem with quite a few pairs I’ve tried. These days I tend to keep the wire in front of my neck for general use.

    I listened to the headphones for about 2 hours on a gym trip, and they felt fine. The sound was good, and the headphones were comfortable. I was enjoying them for the first day.

    Longer Tests

    I decided to try these on a few longer outings and see how they worked. My family went to the mountains for the July 4 weekend, and I took these along, fully charged. I wore them during the two hour car trip up and they performed well. I left them in my bag July 4, but pulled them out for a longer test the next day. I was working from our vacation rental and planned to spent 6-7 hours that day listening to music.

    The headphones worked great for about 3 hours. Just before lunch, I’d get a slight dip in sound as a quiet voice let me know the battery was low. I let this continue for about 12 minutes before they cut off. A full charge, 2 hours in the car, a day+ in a bag, and then 3 more hours was pretty good.

    In other tests, it appears that a full charge is quick. I haven’t watched the charge indicator, but it does seem that about 30 minutes gets these charged. Six hours is what is claimed, and I have no reason to doubt these. I know I’ve used them close to six hours and they’ve worked well.

    The charging port on the inline control means I could actually charge these while listening to them, but it’s not comfortable (I tried). The charging cord weight will pull on one ear.

    Sounds Quality

    I’m not an audiophile, but I think these headphones sound great. There are large drivers that create deep, pleasant bass. Everything I hear is clear and crisp. I even had my kids and wife try this, and they all loved the sound.

    They also all noted that the headphones don’t get loud enough. No complaint about sound, just volume.

    Voice Control

    One of the features of the headphones is voice control. This is available to allow the user to perform the following functions:

    • pause
    • tracks
    • google assistant integration

    The FAQ says there is a caveat to this. If listening to music, the music must be stopped before using voice control. That means if I want to change the volume, I have to reach up and stop the music, putting by hand on the inline control. Right next to the volume control for the headphones.

    In some sense, this reduces the value of the voice control for me. In practicality, I have been able to say “Hey, VoiceIQ, Pause” while music is playing and it works. What I haven’t been able to get working is the restart of music. I also haven’t been able to easily get this to change tracks, or even launch the google assistant. It appears to sometimes work, sometimes not. Some of this might be dependent on whether the phone is unlocked or not, but I haven’t found a consistent method to the use of the feature.

    To be fair, I don’t love voice control of anything. It’s always weird to me, and in moving from Siri to Google, I find it to be less useful. Siri is fairly rigid in how it works, which I like, because I know what’s happening. Google I find more flexible, but also in that sense, less useful. This also might be the problem with music, in that iOS has tight integration with the music app. On Android, it’s a little looser.

    Conclusion

    These are nice headphones. They are very secure, a problem I’ve had with numerous pairs over the years. The sound is great, and they charge quickly. The downsides are the volume, the large drivers, and the cost. I don’t use the voice control much, and I think it’s a strange feature in many places, but you might feel differently.

    I’m not sure I’d pay $99 for these with all the other options out there, but I also wouldn’t rule it out. They are certainly cheaper than many of the other high end pairs, and they have stood up well across a month of use and travel for me. I’ll continue to use them over the next few months, with a few longer trips, and I’m looking forward to seeing how they perform.

    If you’d like to give these a try, Origem has a 30% off coupon. Use “L4IJLJPX” when you checkout.

  • More Kubernetes Concepts

    This post continues looking at my process of learning more about Kubernetes. I’ve been working through the 50 days of Kubernetes (K8s). Now that I had a break from some travel, I went through a few videos in a short period of days. This post combines a few looks at Scenarios, storage, and stateful sets

    Scenarios

    This was a good look at how one of the founders see the Kubernetes being used. The initial idea was microservices, where many services each live in a container and communicate. Managing lots of containers, and lots of instances of each, is where Kubernetes excels.

    The second scenario is the diurnal or cyclical scenario where a load goes up and down each day/night, week/weekend, etc. Having Kubernetes manage the increase and decrease of workload is valuable, and if you’re in the cloud, then you’re not investing heavily in hardware that is unused.

    The third is with complex workflows, where one thing, then another, then another happens. I’m less sold here, but I do see that spin up/spin down, and having these workloads/processes in containers rather than on certain machines makes sense.

    Lastly, AI/ML places where all parts of your flow can access the Kubernetes API and spin things up and down or move workloads to better hardware, like GPU/FPU concentrated systems, that can help keep things moving.

    Good to see the different ways that this might be useful, though I was wondering if I’d see anything database related. I didn’t.

    Volumes and Storage

    The important thing for database workloads is storage. This is a constant question when I talk containers. What about the disks and storage and how does this work.

    This is a basic video, just noting that volumes are objects in K8s. They are attached to pods, but can be mounted (or not) inside containers in the pod. There is temp storage (/emptydir, need to look this one up), but we can also abstract away other storage with Persistent Volume Claims. These are the aspirational storage requirements that the container/pod needs.

    I’m not completely clear on these, and the explanation is a little light, so I’ll have to learn more later.

    Stateful Applications

    The last set of learning for this post. More relevant because SQL is a stateful application. Or so I thought.

    This really looks at stateful sets in Kubernetes, which are the ways in which we want orderly copies in a replica set. This means hostnames and DNS entries in stateful sets are ordered, and 0 based indexed. If I have a host of SalesSQL with 3 sets, I’ll get

    • SalesSQL-0
    • SalesSQL-1
    • SalesSQL-2

    Likewise, I may have salessql.mydomain.com, but I’ll also have the –0, –1, –2 DNS entries as well. The Kubernetes platform also will scale up and down from the end, adding or removing the next ordered element container.

    There can also be volumes associated here, or not, as your stateful application may have the need to use the same volume (like a clustered SQL Server) or separate volumes, like AGs. In any case, it’s a light explanation that I need to know more of.

    One thing I didn’t really like is that the data stores were associated as “cloud native storage applications”, not data stored or data platforms. Application developers I think sometimes forget there’s more to data than storage.

  • The Data Request

    Spotify implemented a way to get your data from your profile. This looks at the request and initial data download.

    The Request

    When you go there, you see a “Manage Your Data” section.

    2019-07-08 16_47_45-Privacy Settings - Spotify

    Below this is a “Download your data” section, with three steps. The first is a request to verify your identity. Clicking this will send an email to your registration email. I like the idea of verifying your identity somehow rather than just letting you get the data. Minor security hurdle, but still one.

    After clicking on the email, step two lights up and shows you that it can take up to 30 days to get data. Similar to a GDPR request, I guess this sets some expectations if they get overloaded, but for now it’s annoying. We’ll see when the data comes.

    Step 3 is the download link, that you can resend.

    Overall, a good process to get what might be private data. It will be interesting to see what they keep on me and what songs and artists appear, both in popularity and unpopularity.

    Getting the Link

    About nine (9) days after sending my request, I woke up and found this in my email:

    2019-07-16 09_02_42-Your Spotify personal data is ready to download - sjones@dkranch.net - DkRanch M

    I clicked the link and went to the same manage data page shown in the first section, but before I could get the download, I saw this. Nice to see they are verifying access to get data.

    2019-07-16 09_02_58-Privacy Settings - Spotify

    When I verified my password, a file downloaded immediately. As expected, it’s zipped.

    2019-07-16 09_40_19-my_spotify_data.zip

    What’s in here? A number of JSON files, of various sizes. There are some items that are less interesting, like the plan and payments.

    2019-07-16 09_40_30-001-way0utwest

    If I open the playlist.json file, I see this:

    2019-07-16 12_52_44-C__Users_Steve_OneDrive_SQL_SpotifyData_Playlist.json - Sublime Text

    One cool thing here, is that this first playlist is one I created yesterday, the day before I received this link. Meaning, I think the notification was someone processing my request, not the time to get the data. The data was assembled with a process, that used data as of yesterday. I could be wrong, but I have a list of songs in a playlist.

    Going on to StreamingHistory, which is where I thought I might see interesting data, I see this:

    2019-07-16 12_56_09-C__Users_Steve_OneDrive_SQL_SpotifyData_StreamingHistory.json - Sublime Text

    This looks like I only have a bit of history, not a lot. The first row is April 2019, the last row is July 2019, when I got the download. Disappointing, as I’d assume I’ll have a much different set of history this year than last year. I’ll have to load this into a database and try to decode it. That’s for another post.

    It is nice to get some of this data, and I wonder what it looks like if I download it again in a week or two. Especially after another trip or two.

    If I lose the data, I can go back and get the file again, at least for 30 days.

    2019-07-16 09_45_55-Privacy Settings - Spotify

    I’m glad that companies are starting to give us some data, at least for us data people. Certainly most people might just like a visualization of analysis of data, but allowing users to get their data means that *anyone*, or more *anyplace* can do this analysis for you. Opportunities that your data gatherer might not create.

    If you use Spotify, I’d be curious what you think of your data. Feel free to write your post and leave me a comment on how you loaded and examined this data. I’ll do some follow-ups on this later.